]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
panel: don't break when indicator has no menu
authorJean-Philippe Braun <eon@patapon.info>
Sun, 24 Jun 2012 08:55:46 +0000 (10:55 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Tue, 10 Jul 2012 20:21:07 +0000 (22:21 +0200)
Status indicators don't have necessarily a menu. If they have not we don't
want to add the menu in the PopupMenuManager.

https://bugzilla.gnome.org/show_bug.cgi?id=678694

js/ui/panel.js

index 06d430056ddd2a5dfac5c50e3b24d941b6856c1f..a06cc92b595576c5fe0bb5cc14c4aef1fae5ae81 100644 (file)
@@ -1126,7 +1126,8 @@ const Panel = new Lang.Class({
         if (!position)
             position = 0;
         this._insertStatusItem(indicator.actor, position);
-        this._menus.addMenu(indicator.menu);
+        if (indicator.menu)
+            this._menus.addMenu(indicator.menu);
 
         this._statusArea[role] = indicator;
         let destroyId = indicator.connect('destroy', Lang.bind(this, function(emitter) {